package org.jeecg.common.view;

import org.springframework.web.servlet.view.AbstractView;

import javax.servlet.http.HttpServletRequest;

/**
 * @author gchiaway
 * 日期: 2022-04-21
 * 时间: 15:32
 */
public abstract class MiniAbstractCsvView extends AbstractView {

    protected static final String CSV = ".csv";
    private static final String CONTENT_TYPE = "application/csv";

    public MiniAbstractCsvView() {
        setContentType(CONTENT_TYPE);
    }

    protected boolean isIE(HttpServletRequest request) {
        return (request.getHeader("USER-AGENT").toLowerCase().indexOf("msie") > 0 || request.getHeader("USER-AGENT").toLowerCase().indexOf("rv:11.0") > 0) ? true : false;
    }


}
